import {Component, ViewEncapsulation} from '@angular/core';
import {NavigationStart, Router} from "@angular/router";

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss'],
  host:{
    '[class.docs-dark-theme]': 'isDarkTheme',
  },
  encapsulation: ViewEncapsulation.None,
})
export class AppComponent {
  isDarkTheme = false;
  showShadow = false;
  constructor(router: Router) {
    router.events.subscribe((data: NavigationStart) => {
      this.showShadow
        = data.url.startsWith('/functions')
        || data.url.startsWith('/pending')
        || data.url.startsWith('/progressing')
      ;
    })
  }
}
